<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>후기 등록</title>
<style type="text/css">
	#board_wrap{
		margin-left: 30px;
		margin-top: 30px;
		padding: 0;
		font-family: Verdana;
		font-size: 12px;
		color: #696969;
		line-height: normal;
		font-style: normal;
	}
	#board_center{
		width: 699px;
		margin-right: 10px;
	}
	#board_middle{
		margin-left: 30px;
	}
	#board_head{
		float: left;
		width: 699px;
		text-align: left;
		position: relative;
	}
	#info_table{
		border-spacing: 2px;
		border-color: gray;
		border-collapse: collapse;
		width:650px;
		text-align: left;
		border-top: 1px solid #383838;
		border-bottom: 1px solid #e0e0e0;
		background: #fff;
	}
	#info_table th{
		width: 150px;
		text-align: left;
		background:#fff2e2; 
		padding: 10px 0 10px 30px;
		font-weight: bold;
		border-top: 1px solid #e0e0e0;
		border-bottom: 1px solid #e0e0e0;
	}
	#info_table td{
		text-align: left;
		padding: 10px 10px 10px 30px;
		border-top: 1px solid #e0e0e0;
	}
	#btn_write{
		width: 650px;
		text-align: center;
	}
	.list_button{
		width: 130px;
		height: 30px;
		background-color: #2F4F4F;
		font-family: "맑은 고딕";
		font-size: 9pt;
		color: white;
		border: 0;
		border-radius:5px;
	}
	.write_button{
		margin-left:20px;
		width: 130px;
		height: 30px;
		background-color: #2F4F4F;
		font-family: "맑은 고딕";
		font-size: 9pt;
		color: white;
		border: 0;
		border-radius:5px;
	}
	#b{
		color:red;
	}
</style>
</head>
<body>
<div id="board_wrap">
	<div id="board_center">
		<div id="board_head">
			<p>
				<img src="./images/board/title_review_4.png">
			</p>
		</div>
		<form:form enctype="multipart/form-data" commandName="boardCommand" action="writePro.do">
			<input type="hidden" name="writer" value="${member_name}">
			<div id="board_middle">
				<table id="info_table">
					<tr>
						<th>작 성 자</th>
						<td>${member_name}</td>
					</tr>
					<tr>
						<th>매 장</th>
						<td>
						<select name="branch_name">
							<c:forEach var="branch" items="${branchList}">
								<option value="${branch.branch_name}">${branch.branch_name}</option>
							</c:forEach>
						</select>
						</td>
					</tr>
					<tr>
						<th>제 목</th>
						<td>
							<form:input path="board_title" title="입력하세요" maxlength="25"/><form:errors path="board_title" id="b"/>
						</td>
					</tr>
					<tr>
						<th>후 기</th>
						<td>
							<form:textarea rows="10" cols="50" path="board_content" /><br><form:errors path="board_content" id="b"/>
						</td>
					</tr>
					<tr>
						<th>사 진</th>
						<td>
							<input type="file" name="upload"><form:errors path="upload" id="b"/>
						</td>
					</tr>
				</table>
				<p style="height: 5px"></p>
				<p id="btn_write">
					<input type="button" value="목록으로" class="list_button" style="cursor: pointer;" onclick="location.href='boardList.do'"><input type="submit" value="후기등록" class="write_button" style="cursor: pointer;">
				</p>
				<p style="height: 20px"></p>
			</div>
		</form:form>
	</div>
</div>
</body>
</html>